package com.zx.server.util;

public class ServerResult<T> {
	private Integer code; 
	private String message;
	private String info;
	private T data;
	
	public ServerResult(){
		
	}
	
	public ServerResult(Integer code, String message, String info, T data) {
		super();
		this.code = code;
		this.message = message;
		this.info = info;
		this.data = data;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}
	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public boolean isSuccess(){
		if(code.equals(ServiceCode.SUCCESS)){
			return true;
		}
		return false;
	}
}
